#pragma once
#include "ISyncEvent.h"
#include "IMessageSystem.h"
#include "IPumpService.h"
#include "IChannelManager.h"

class SyncConnectEvent:public ISyncEvent,public CObject
{
public:
	SyncConnectEvent(IMessageSystem::CallBack::OnConnectSuccess s,IMessageSystem::CallBack::OnConnectFailed f,void* ud);

	void SetResult(bool success,IPumpService* svc);

	virtual void Handle(IChannelManager*);

private:
	IMessageSystem::CallBack::OnConnectSuccess m_SuccessCallback;
	IMessageSystem::CallBack::OnConnectFailed  m_FailCallback;
	void*									   m_pUserData;
	bool									   m_bResult;
	IPumpService*							   m_pResultService;
};